Skip to content

Instantly share code, notes, and snippets.

@supertopoz
supertopoz / server.js
Created January 12, 2024 00:34
Run Sendbird's Functions for handing off to an agen
const express = require("express");
const axios = require("axios");
const app = express();
app.use(express.json());
const APP_ID = process.env.APP_ID;
const API_TOKEN = process.env.API_TOKEN;
const SENDBIRDDESKAPITOKEN = process.env.SENDBIRDDESKAPITOKEN
// SendBird API Base URL
@supertopoz
supertopoz / fetch_channels.js
Created November 1, 2021 02:17
How to implement read receipts in Sendbird Chat
sb.GroupChannel.getChannel(CHANNEL_URL, function(groupChannel, error) {
if (error) {}
groupChannel.markAsRead()
});
//
// ViewController.swift
// sendbird_channel_change
//
// Created by Jason.Allshorn on 08/06/2021.
//
import UIKit
import SendBirdSDK
package com.simple.android_push_replies_only.fcm;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
const express = require('express');
const axios = require("axios");
const sf = require('node-salesforce');
const app = express();
app.use(express.json())
const port = process.env.PORT || 3000;
<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
<lightning:utilityBarAPI aura:id="utilitybar" />
<aura:attribute name="recordId" type="String" />
<aura:attribute name="data" type="String" />
<lightning:navigation aura:id="navService" />
<aura:handler name="init" value="{!this}" action="{!c.doInit } " />
<lightning:container
aura:id="SendBird_Bar"
src="{!$Resource.sendbird_bar + '/index.html'}"
onmessage="{!c.handleMessage}"
//
// AlertManager.swift
// uikitsimple
//
// Copyright © 2020 SendBird, Inc. All rights reserved.
//
import UIKit
// This function handles alertController to be used in the sample app.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>React App</title>
</head>
<body>
class SearchUsers {
constructor(sb) {
this.sb = sb;
this.lookupDictionary = {};
this.userDictionary = {};
}
addQueryUsersToDictionary(users, searchTerm) {
if (users.length === 0) {
this.lookupDictionary[searchTerm] = {};
class SearchMembers {
constructor(channel) {
this.targetChannel = channel;
this.dictionary = {};
}
addQueryUsersToDictionary(users, searchTerm) {
if (users.length === 0) {
this.dictionary[searchTerm] = {};
return;